home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm1
/
amybw214.lha
/
AmyBW
/
Rot13.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-03
|
1KB
|
46 lines
/**********************************************
** Rot13 a message * Sample arexx script **
**********************************************
** **
** Set up the user command like this: **
** +--------------------------------------+ **
** | Command: RX AmyBW:Rot13.rexx | **
** | Filename: T:AmyBW.temp | **
** | Write msg text: Y | **
** | Incude header: N | **
** | Reload msg text: Y | **
** +--------------------------------------+ **
**********************************************/
/***
*** Open input and output file
***/
call open(in,"T:AmyBW.temp",read)
call open(out,"T:AmyBW.rot",write)
/***
*** Translate the lines
***/
do while ~EOF(in)
inline = readln(in)
outline = TRANSLATE(inline,'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
call writeln(out, outline)
end
/***
*** Close the files
***/
call close(in)
call close(out)
/***
*** Delete original, rename new file
***/
address command 'Delete >NIL: T:AmyBW.temp'
address command 'Rename >NIL: T:AmyBW.rot T:AmyBW.temp'